<?php date_default_timezone_set('Australia/Brisbane'); ?>
	<ul id="assessment_sdue">
		<li class="titles">
			<i class="c1">Name</i>
			<i class="c2">Date Due</i>
			<i class="c3">&#37;</i>
			<i class="c4">Submission</i>
		</li>
		<?php
		
		$nowU = date('U');
		$nowU = $nowU + 604800;
		$hasresult = false;
		foreach($assessment_items as $key => $item): ?>
		
		<?php 
		if($item['marked']==''){
		$hasresult = true;
		$format = 'Y-m-d H:i:s';
		$date = DateTime::createFromFormat($format, $item['due_date']);
		$dateU = $date->format('U');
		$date = $date->format('d/F');
		?>
		<li<?php if($nowU >= $dateU){echo ' class="r"';} ?>><a href="<?php echo site_url("/assessment/view/".$item['assessment_id']); ?>"><i class="c1"><?php echo $item['assessment_title']; ?></i><i class="c2"><?php echo $date; ?></i><i class="c3"><?php echo $item['weight']; ?></i></i></a><i class="c4">
		<?php echo '<a href="#'. $item['assessment_id'].'">Submit</a>'; ?>
		</i></li>
		
		<?php } endforeach; ?>
		
		<?php if(!$hasresult):?>
		<textarea id="txtdesc" name="desc"><?php echo $item_details['description']; ?></textarea>
		<?php endif; ?>